package com.codegen.handler;

import com.codegen.entity.Field;
import com.codegen.entity.TableField;
import com.fasterxml.jackson.databind.JavaType;
import org.apache.ibatis.type.MappedTypes;

import java.util.ArrayList;
import java.util.List;
@MappedTypes(value = {TableField.class})
public class TableFieldHandler extends JsonTypeHandler<List<TableField>> {

    public TableFieldHandler(Class<List<TableField>> clazz) {
        super(clazz);
    }

    @Override
    public JavaType getJavaArrayType() {
        return getCollectionType(ArrayList.class, TableField.class);
    }
}
